1. Technical Field
The present invention relates generally to a read/write cache device and method that are persistent in the event of a power failure and, more particularly, to a read/write cache device and method that are persistent in the event of a power failure, which are capable of, in a hybrid storage system that consists of a high-speed storage device and a low-speed storage device, improving read/write performance using the high-speed storage device as a cache device, retaining data even when a power failure occurs, and exhibiting a low overhead with general high-speed storages that are available in the market.
2. Description of the Related Art
Generally, in the fields in which computers are employed, a storage system is one of the important components that are capable of retaining data.
Recently, storage devices having new structures completely different from those of hard disk drives (HDDs), i.e., semiconductor storage devices such as solid state drives (SSDs) composed of semiconductors, have emerged and developed. Such semiconductor storage devices are more expensive than HDDs, but have processing speeds that are several hundreds of times faster than those of HDDs.
Although a storage device including only SSDs has very high performance, it has smaller capacity than an HDD. In contrast, although a traditional storage device based on an HDD has high capacity relative to its cost, it has very low performance. Accordingly, many efforts have been made to construct a single virtual storage device by combining an SSD and an HDD.
In general, all data used in a computer is stored in a low-speed storage device (i.e., an HDD), but frequently used data is cached in a high-speed storage device (i.e., an SSD). However, the high-speed storage device is used as only a read cache due to a data consistency problem that occurs in the event of a power failure. That is, when a write request for a cached region of the high-speed storage device is delivered, the cached region needs to be evicted from the high-speed storage device. Accordingly, traditional technologies exhibit high performance for read-oriented workloads, but low performance for write-oriented workloads.
A write cache refers to a cache that can support the consistency of cached data even after a crash or power failure and can retain dirty data in the high-speed storage device. However, a write cache that consists of common storage devices has not yet been proposed due to performance degradation and a data consistency problem.
A write cache needs to consistently store the cache metadata in a nonvolatile storage device along with cached data, but performance degradation in the write cache is significant because the cache metadata must be updated whenever cache information changes. An embodiment of the present invention proposes a high-performance write cache that can ignore the overhead of a write cache. The write cache may provide twice performance improvement of a read-only cache.
The write cache must guarantee the consistency of cached data and cache metadata even after a power failure so that the cached data can be used immediately after a system has started.
In an embodiment of the present invention, the overhead to consistently maintain the cache metadata is very small. In particular, the present invention learns and analyzes I/O accesses for a long period of time. Updating the cache content is periodical performance during idle time after long-term learning. In connection with a desktop workload, a periodic cache update method according to an embodiment of the present invention may decrease the hit rate in comparison with on-demand cache replacement policies. However, on-demand cache replacement policies consume a considerable portion of the high-speed storage device.
In accordance with an embodiment of the present invention, to solve the consistency problem of a persistent write cache, a special device is not used, bat a known high-speed storage device that can be easily purchased in the market is used.
Furthermore, recency and frequency are taken into consideration. Recently or frequently used data may be cached. If data has not been recently used, the data is not cached even if the data is frequently used. Although many traditional cache replacement policies that consider both recency and frequency have been proposed, they cannot be used in a write cache that is persistent when a power failure occurs because they have been designed for volatile memory. Accordingly, the structure of the present invention is significantly different from traditional cache policies.
In particular, the present invention provides a read/write cache method that persistently and consistently manages its data and metadata, and guarantees no data loss even after a crash.